<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>居中</title>
		<style type="text/css">
			html,
			body,
			.s {
				width: 100%;
				height: 100%;
				margin: 0;
				padding: 0;
				overflow: hidden;
			}
			
			.s {
				display: -webkit-box;
				display: -ms-flexbox;
				display: -webkit-flex;
				display: flex;
				-webkit-box-pack: center;
				-ms-flex-pack: center;
				-webkit-justify-content: center;
				justify-content: center;
				-webkit-box-align: center;
				-ms-flex-align: center;
				-webkit-align-items: center;
				align-items: center;
			}
		</style>
	</head>

	<body>
		<div class="s">
			你好
		</div>
	</body>

</html>